//package com.example.tests;

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.util.regex.Pattern;

public class test2 extends SeleneseTestCase {
	@Before
	public void setUp() throws Exception {
		selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.gfwfn.com/");
		selenium.start();
	}

	@Test
	public void testUntitled() throws Exception {
		selenium.open("/");
		selenium.click("css=img[alt=\"Enroll\"]");
		selenium.waitForPageToLoad("30000");
		selenium.type("id=txtZip", "01234");
		selenium.type("id=txtRadius", "10");
		selenium.click("name=submit");
		selenium.waitForPageToLoad("60000");
		selenium.click("link=Test Dealership");
		selenium.waitForPageToLoad("30000");
		selenium.type("id=txtFirstName", "Tester");
		selenium.type("id=txtMiddleInitial", "T");
		selenium.type("id=txtLastName", "Tester112");
		selenium.type("id=txtAddress", "1 American Road");
		selenium.type("id=txtAppartment", "11");
		selenium.type("id=txtCity", "Dearborn");
		selenium.select("id=selState", "label=Michigan");
		selenium.type("id=txtZip", "01234");
		selenium.type("name=txtEmail", "johntest12@live.com");
		selenium.click("id=cbMarketingOptIn");
		selenium.click("id=cbOver18");
		selenium.click("id=cbRules");
		selenium.click("name=submit");
		selenium.waitForPageToLoad("30000");
	}

	@After
	public void tearDown() throws Exception {
		selenium.stop();
	}
}
